package com.itbac.domain;

import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 * 商品
 *
 insert into `shop_product` value(null ,'小米','1000','5000');
 insert into `shop_product` value(null ,'华为','2000','5000');
 insert into `shop_product` value(null ,'苹果','3000','5000');
 insert into `shop_product` value(null ,'oppo','4000','5000');
 */
@Entity(name = "shop_product")
@Data
public class Product {
    //主键自增涨
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer pid;
    //商品名称
    private String name;
    //价格
    private Double price;
    //库存
    private Integer stock;



}
